package com.ruoyi.club.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.club.mapper.CmsClubStulevelMapper;
import com.ruoyi.club.domain.CmsClubStulevel;
import com.ruoyi.club.service.ICmsClubStulevelService;
import com.ruoyi.common.core.text.Convert;

/**
 * 俱乐部学员级别Service业务层处理
 * 
 * @author miki
 * @date 2024-10-01
 */
@Service
public class CmsClubStulevelServiceImpl implements ICmsClubStulevelService 
{
    @Autowired
    private CmsClubStulevelMapper cmsClubStulevelMapper;

    /**
     * 查询俱乐部学员级别
     * 
     * @param stulevelId 俱乐部学员级别ID
     * @return 俱乐部学员级别
     */
    @Override
    public CmsClubStulevel selectCmsClubStulevelById(Long stulevelId)
    {
        return cmsClubStulevelMapper.selectCmsClubStulevelById(stulevelId);
    }

    /**
     * 查询俱乐部学员级别列表
     * 
     * @param cmsClubStulevel 俱乐部学员级别
     * @return 俱乐部学员级别
     */
    @Override
    public List<CmsClubStulevel> selectCmsClubStulevelList(CmsClubStulevel cmsClubStulevel)
    {
        return cmsClubStulevelMapper.selectCmsClubStulevelList(cmsClubStulevel);
    }

    /**
     * 新增俱乐部学员级别
     * 
     * @param cmsClubStulevel 俱乐部学员级别
     * @return 结果
     */
    @Override
    public int insertCmsClubStulevel(CmsClubStulevel cmsClubStulevel)
    {
        return cmsClubStulevelMapper.insertCmsClubStulevel(cmsClubStulevel);
    }

    /**
     * 修改俱乐部学员级别
     * 
     * @param cmsClubStulevel 俱乐部学员级别
     * @return 结果
     */
    @Override
    public int updateCmsClubStulevel(CmsClubStulevel cmsClubStulevel)
    {
        return cmsClubStulevelMapper.updateCmsClubStulevel(cmsClubStulevel);
    }

    /**
     * 删除俱乐部学员级别对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteCmsClubStulevelByIds(String ids)
    {
        return cmsClubStulevelMapper.deleteCmsClubStulevelByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除俱乐部学员级别信息
     * 
     * @param stulevelId 俱乐部学员级别ID
     * @return 结果
     */
    @Override
    public int deleteCmsClubStulevelById(Long stulevelId)
    {
        return cmsClubStulevelMapper.deleteCmsClubStulevelById(stulevelId);
    }
}
